<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8"></meta>
    <title>${topic.title!''} - 有乐窝</title>
    <#include "../include/common.html">
        <script type="text/javascript">
            ulewo.usercenter = {
                userId:${user.userId}
            }
            ulewo.topicId = "${topic.blogId?c}";
            ulewo.topicType = "B";
            ulewo.topicTitle = "${topic.title!''}";
            ulewo.editorWidth = 875
        </script>
        <link rel="stylesheet" href="${absolutePath}/resource/markdown/editormd.css"/>
        <link rel="stylesheet" href="${absolutePath}/resource/css/user.usercenter.css?version=20160603"/>
        <script type="text/javascript" src="${absolutePath}/resource/js/attachment.js?version=20151209"></script>
        <#if user.themeType==1>
            <link rel="stylesheet" href="${absolutePath}/resource/css/cust.usercenter.css"/>
        </#if>
        </head>
<body>
<#include "../include/top.html">
    <div class="main">
        <div class="user-center-bg"
             style="background-color:${user.userBgColor};background-image: url('${absolutePath}/resource/images/${user.userBg}')">
            <div class="user-home-icon"><img src="${imageDomain}upload/${user.userIcon}"></div>
        </div>
        <div class="main-home">
            <div class="left">
                <#include "blog_left.html">
            </div>
            <div class="right">
                <div class="user-home-tag">
                    <ul class="tag" id="tag">
                        <li type="spitslot"><a href="${absolutePath}/user/${user.userId}">吐槽</a></li>
                        <li type="topic"><a href="${absolutePath}/user/${user.userId}#topic">讨论</a></li>
                        <li type="ask"><a href="${absolutePath}/user/${user.userId}#ask">问答</a></li>
                        <li type="knowledge"><a href="${absolutePath}/user/${user.userId}#knowledge">知识库</a></li>
                        <li class="active" type="blog"><a href="${absolutePath}/user/${user.userId}/blog">博客</a></li>
                        <li type="fans"><a href="${absolutePath}/user/${user.userId}#fans">Ta的粉丝</a></li>
                        <li type="focus"><a href="${absolutePath}/user/${user.userId}#focus">Ta关注的人</a></li>
                    </ul>
                </div>
                <div class="topic-info-con">
                    <div class="topic-title">
                        ${topic.title!''}
                        <span class="time">${topic.showCreateTime!''}</span>
                        &nbsp;&nbsp;&nbsp;&nbsp;
                        <#if Session["session_user_key"]??&&topic.userId==session_user_key.userId>
                            <a href="${absolutePath}/admin/edit_blog.action?blogId=${topic.blogId?c}"
                               style="font-size: 13px;">修改</a>
                        </#if>
                    </div>
                    <div class="topic-info-d topic-count-info">
                        <span class="count"><i class="icon icon-read"></i><span>阅读：${topic.readCount!'0'}</span></span>
                        <span class="count"><i class="icon icon-comment"></i><span>评论：<span
                                id="comment-count">${topic.commentCount!'0'}</span></span></span>
                        <span class="count"><i class="icon icon-like"></i><span>喜欢：<span
                                id="like-count">${topic.likeCount!'0'}</span></span></span>
                        <span class="count"><i class="icon icon-collection"></i><span>收藏：<span
                                id="collection-count">${topic.collectionCount!'0'}</span></span></span>
                    </div>
                </div>
                <div style="text-align: center;margin: 10px 0px">
                    <script type="text/javascript">
                        /*博客详情*/
                        var cpro_id = "u2490922";
                    </script>
                    <script src="http://cpro.baidustatic.com/cpro/ui/c.js" type="text/javascript"></script>
                </div>
                <div class="topic-detail markdown-body">
                    ${topic.content!''}
                </div>
                <#if topic.file??>
                    <div class="attachment">
                        <div class="attachment-title">附件</div>
                        <div class="attachment-info">
                            <span class="filename"><i class="icon icon-package"></i>${topic.file.fileName!''}</span>&nbsp;&nbsp;
                            <span class="mark">所需积分：${topic.file.downloadMark!''}</span>&nbsp;&nbsp;
                            <span class="dccount">下载：<a href="javascript:void(0)"
                                                        attachmentid="${topic.file.attachmentId?c!''}" id="dcount">${topic.file.downloadCount!'0'}</a></span>&nbsp;&nbsp;
                            <a href="javascript:void(0)" class="btn" topicid=${topic.blogId?c}
                               attachmentid="${topic.file.attachmentId?c!''}" id="downloadFile">点击下载</a>
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            <a href="${absolutePath}/get_mark" target="_blank">没有积分？</a>
                            <div id="attachedUser" style="display: none;"></div>
                        </div>
                    </div>
                </#if>
                <div class="like-users">
                    <#if (topic.likeUsers?size>0)>
                        <#list topic.likeUsers as like>
                            <a href="${absolutePath}/user/${like.userId}">${like.userName}</a>
                        </#list>
                        <span class="like-info">很喜欢这篇文章</span>
                    </#if>
                </div>
                <div class="pre-next">
                    <#if (preAndNext?size==2) >
                        <#assign pre=preAndNext[0] />
                        <#assign next=preAndNext[1] />
                        <div class="pre">上一篇：<a href="${absolutePath}/user/${user.userId}/blog/${pre.blogId?c}">${pre.title}</a>
                        </div>
                        <div class="next">下一篇：<a href="${absolutePath}/user/${user.userId}/blog/${next.blogId?c}">${next.title}</a>
                        </div>
                    </#if>

                    <#if (preAndNext?size==1) >
                        <#assign item=preAndNext[0] />
                        <#if (item.blogId>topic.blogId)>
                            <div class="pre">上一篇：没有了</div>
                            <div class="next">下一篇：<a href="${absolutePath}/user/${user.userId}/blog/${item.blogId?c}">${item.title}</a>
                            </div>
                            <#else>
                                <div class="pre">上一篇：<a
                                        href="${absolutePath}/user/${user.userId}/blog/${item.blogId?c}">${item.title}</a>
                                </div>
                                <div class="next">下一篇：没有了</div>
                        </#if>
                    </#if>
                </div>
                <#include "../comment/comment.html">
            </div>
            <div class="clear"></div>
        </div>
    </div>
    <#include "../include/footer.html">
</body>
</html>
